Optimize gdk_x11_screen_supports_net_wm_hint()
authorJohn Lindgren <john.lindgren@aol.com>
Sun, 23 Jun 2013 19:22:13 +0000 (21:22 +0200)
committerBenjamin Otte <otte@redhat.com>
Sun, 23 Jun 2013 19:25:26 +0000 (21:25 +0200)
commit6eea6ddcc3a8dc1ac18e83161de2acfa77a356e8
tree7380908a34f2544c86c12732175cb59282786321
parent1107935d2b6d91767fc9c561c00beba5fa9aebbc
Optimize gdk_x11_screen_supports_net_wm_hint()

Move the call to gdk_x11_atom_to_xatom_for_display() outside of the
search loop in gdk_x11_screen_supports_net_wm_hint().  In my test case
(running Audacious for about a minute), this reduced the total number of
hash table lookups performed from 370,000 to 230,000.

https://bugzilla.gnome.org/show_bug.cgi?id=702913
gdk/x11/gdkscreen-x11.c